package cn.wowjoy.pda.android_pharmacy.mvvm.presenter;

import cn.wowjoy.pda.android_pharmacy.common.core.BasePresenter;
import cn.wowjoy.pda.android_pharmacy.common.widget.MyToast;
import cn.wowjoy.pda.android_pharmacy.mvvm.vm.DoorTakeProgressDetailViewModel;

/**
 * Created by sinyo on 2017/7/24.
 */

public class DoorTakeProgressDetailPresenter extends BasePresenter<DoorTakeProgressDetailViewModel>{
    @Override
    public void onCreatePresenter() {

    }

    public boolean  check(String should, String fact){
        int s = 0;
        int f = 0;
       if(should != null && fact !=null){
           if(should.length() !=0 && should.length() <9 &&  fact.length() != 0 && fact.length()<9){
               s = Integer.parseInt(should);
               f = Integer.parseInt(fact);
           }else {
               new MyToast(context).showinfo("请核对数量");
               return false;
           }
       }
        if(s != f){
            new MyToast(context).showinfo("请核对数量");
           return false;
         }
         return true;
    }
}
